using Microsoft.VisualStudio.TestTools.UnitTesting;
using static FlyIL.AssemblerRegisters;

namespace FlyIL.Trace.Tests
{

    [TestClass()]
    public class 追踪_标志位
    {

        /// todo: 待添加

        [TestMethod()]
        public void Test1()
        {

            Context vcontext = new Context(false);

            vcontext.OptimizerOption.TraceBitFlags = true;

            vcontext.Make().mov(R1D, R2D);
            vcontext.Make().test(R1D, R2D);

            vcontext.Make().mov(R2L, ZF);

            var exp = vcontext.TraceStrict(vcontext.Codes.Last, ref vcontext.Last.O1);

            Assert.IsNotNull(exp);

            Assert.AreEqual(exp.Result, (ulong)1);
        }


    }


}